<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.util.Map,com.opensymphony.xwork2.ActionContext,com.us.manage.pojo.Manage"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>

<script src="../js/jquery_last.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="css/main.css">
<link type="text/css" rel="stylesheet" href="../js/style/validator.css"></link>
<script src="../js/formValidator.js" type="text/javascript" charset="UTF-8"></script>
<script src="../js/formValidatorRegex.js" type="text/javascript" charset="UTF-8"></script>
<script language="javascript" src="../js/DateTimeMask.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
	//$.formValidator.initConfig({onerror:function(){alert("校验没有通过，具体错误请看错误提示")}});
	$.formValidator.initConfig({formid:"form1",onerror:function(msg){alert(msg)},onsuccess:function(){return true;}});

	$("#password1").formValidator({onshow:"请输入密码",onfocus:"密码不能为空",oncorrect:"密码合法"}).inputValidator({min:1,empty:{leftempty:false,rightempty:false,emptyerror:"密码两边不能有空符号"},onerror:"密码不能为空,请确认"});
	$("#password2").formValidator({onshow:"请输入重复密码",onfocus:"两次密码必须一致",oncorrect:"密码一致"}).inputValidator({min:1,empty:{leftempty:false,rightempty:false,emptyerror:"重复密码两边不能有空符号"},onerror:"重复密码不能为空,请确认"}).compareValidator({desid:"password1",operateor:"=",onerror:"2次密码不一致,请确认"});

});

</script>
<style type="text/css" media="all">
body,div{font-size:12px;}
</style>
<body>
<jsp:include page="adminTitle.jsp" flush="true"></jsp:include>
<div id="mainpage">
  <div class="bodytitle">
    <div class="bodytitleleft"></div>
    <div class="bodytitletxt">资料修改</div>
  </div>

  <%
  	Map sessions = (Map) ActionContext.getContext().getSession();
  	
  	String admin_name = ((Manage)session.getAttribute("smanage")).getAdmin_name();
  	int admin_id = ((Manage)session.getAttribute("smanage")).getAdmin_id();
   %>
<form action="../manage/updateAdminpsw.action" method="post" name="form1" id="form1">
<input type="hidden" name="admin_id" value="<%=admin_id %>"/>
  <table width="90%" border="0" align="center" cellpadding="10" cellspacing="1" bgcolor="#E2F5BC" style="margin-top:6px;">
    <tr> 
      <td align="right" border="0" align="center" cellpadding="10" cellspacing="1" bgcolor="#E2F5BC" style="margin-top:6px;">用  户  名:</td>
      <td style="color: red;"><%=admin_name %></td>
      <td><div id="admin_nameTip" style="width:250px"></div></td>
    </tr>
    <tr> 
      <td align="right">密 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码:</td>
      <td><input type="password" id="password1" name="manage.admin_password" style="width:120px" /></td>
      <td><div id="password1Tip" style="width:250px"></div></td>
    </tr>
    <tr> 
      <td align="right">重复密码:</td>
      <td><input type="password" id="password2" name="manage.admin_password2" style="width:120px" /></td>
      <td><div id="password2Tip" style="width:250px"></div></td>
    </tr>
    
    <tr>
    	<td rowspan="3" align="center">
    		 <input type="submit" name="button" id="button" value="提交" />
    		 <input type="reset" name="button" id="button" value="重置" />
    		 <input type="reset" name="button" id="button" value="返回" onclick="javascript:history.go(-1)"/>
    	</td>
    </tr>
  </table>
</form>

</div>
</body>
</html>
<script defer="defer" src="../js/datepicker/WdatePicker.js" type="text/javascript"></script>